import Vue from 'vue'
import { Button, Tabbar, TabbarItem, Icon, NavBar, Toast, Search, Popup, Swipe, SwipeItem, PullRefresh, Grid, GridItem, Loading, Cell, CellGroup, Form, Field, Card, Tab, Tabs, Tag, Col, Row, Divider, Dialog, Progress, List, Badge, Overlay, Collapse, CollapseItem } from 'vant';
import { Image as VanImage } from 'vant';
import App from './App.vue'
import router from './router'
import store from './store'

// rem配置
import 'amfe-flexible'

Vue.config.productionTip = false;
Vue.use(Tag);
Vue.use(Col);
Vue.use(Row);
Vue.use(Tab);
Vue.use(List);
Vue.use(Tabs);
Vue.use(Icon);
Vue.use(Cell);
Vue.use(Grid);
Vue.use(Form);
Vue.use(Card);
Vue.use(Badge);
Vue.use(Field);
Vue.use(Swipe);
Vue.use(Popup);
Vue.use(Search);
Vue.use(NavBar);
Vue.use(Button);
Vue.use(Tabbar);
Vue.use(Loading);
Vue.use(Divider);
Vue.use(Overlay);
Vue.use(Collapse);
Vue.use(VanImage);
Vue.use(GridItem);
Vue.use(Progress);
Vue.use(SwipeItem);
Vue.use(CellGroup);
Vue.use(TabbarItem);
Vue.use(PullRefresh);
Vue.use(CollapseItem);

// 自定义全局属性
Vue.prototype.globalObj = {
  normColor: "#DD001B",
  $Toast: Toast,
  $Dialog: Dialog,
  musicList: [],
  musicIndex: 0,
}

// 自定义组件
// Vue.directive('title', {
//   inserted: (el, binding) => {
//     document.title = el.dataset.title;
//   }
// })

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
